package com.ruoyi.base.enums.item;

import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * 行星材料
 *
 * @author lcf
 */
public enum PlanetaryMaterialsEnum {
    /**
     * 光泽和金
     */
    gzhj(1, "光泽和金", "J1AU-9|八|44.25", "MZ1E-P|九|42.69", "MZ1E-P|八|41.81", "43B-01|七|41.45", "3T7-M8|七|40.5"),
    /**
     * 光彩合金
     */
    gchj(2, "光彩合金", "MZ1E-P|八|41.34", "MZ1E-P|九|40.69", "3T7-M8|七|39.73", "N2IS-B|七|36.83", "5S-KXA|八|35"),
    /**
     * 闪光合金
     */
    sghj(3, "闪光合金", "MZ1E-P|六|40.01", "XCBK-X|一|38.93", "5S-KXA|一|38.17", "WUZ-WM|四|37.15", "5S-KXA|三|34.63"),
    /**
     * 浓缩合金
     */
    nshj(4, "浓缩合金", "X3-PBC|六|46.01", "N2IS-B|三|45.9", "X3-PBC|九|43.47", "XCBK-X|五|42.94", "XCBK-X|八|41.86"),
    /**
     * 精密合金
     */
    jmhj(5, "精密合金", "GY5-26|十三|35.58", "9CK-KZ|九|33.85", "X3-PBC|五|28.43", "J1AU-9|一|23.6"),
    /**
     * 杂色复合物
     */
    zsfhw(6, "杂色复合物", "VPLL-N|二|38.93", "GY5-26|十三|35.33", "3T7-M8|一|35.08", "3T7-M8|八|35.05"),
    /**
     * 纤维复合物
     */
    xwfhw(7, "纤维复合物", "J1AU-9|七|50.25", "X3-PBC|十|47.44", "4N-BUI|五|42.9", "9CK-KZ|四|41.4", "GY5-26|九|41.33"),
    /**
     * 透光复合物
     */
    tgfhw(8, "透光复合物", "43B-01|二|35.63", "5S-KXA|八|33.27"),
    /**
     * 多样复合物
     */
    dyfhw(9, "多样复合物", "J1AU-9|七|45.71", "WUZ-WM|五|44.52", "5S-KXA|九|41.42", "5S-KXA|二|38.98", "GY5-26|五|38.90"),
    /**
     * 光滑复合物
     */
    ghfhw(10, "光滑复合物", "9CK-KZ|一|41.8", "GY5-26|七|41.42", "WUZ-WM|二|41.38", "3T7-M8|七|41.3", "J1AU-9|二|39.8"),
    /**
     * 晶体复合物
     */
    jtfhw(11, "晶体复合物", "J1AU-9|四|41.85", "MZ1E-P|六|38.51", "5S-KXA|十|36.45", "4N-BUI|七|34.42", "N2IS-B|九|32.55"),
    /**
     * 黑暗复合物
     */
    hafhw(12, "黑暗复合物", "43B-01|二|35.58", "X3-PBC|二|31.89", "X3-PBC|四|31.21", "J1AU-9|三|29.08", "X3-PBC|一|23.27"),
    /**
     * 活性气体
     */
    hxqt(13, "活性气体", "J1AU-9|四|43.98", "J1AU-9|九|42.98", "X3-PBC|十|40.85", "N2IS-B|九|40.35", "43B-01|八|39.67"),
    /**
     * 稀有气体
     */
    xyqt(14, "稀有气体", "43B-01|八|41.15", "4N-BUI|六|40.7", "GY5-26|八|39.88", "VPLL-N|三|38.04", "9CK-KZ|八|36.7"),
    /**
     * 基础金属
     */
    jcjs(15, "基础金属", "J1AU-9|六|11.15", "4N-BUI|六|10.74", "4N-BUI|八|10.73", "4N-BUI|九|10.02", "MZ1E-P|五|10.01"),
    /**
     * 重金属
     */
    zjs(16, "重金属", "43B-01|二|44.27", "WUZ-WM|二|36.58", "3T7-M8|八|32.98", "N2IS-B|四|32.83", "VPLL-N|二|31.99"),
    /**
     * 贵金属
     */
    gjs(17, "贵金属", "9CK-KZ|五|47.40", "5S-KXA|六|46.95", "WUZ-WM|五|46.40", "X3-PBC|七|44.36", "43B-01|四|42.85"),
    /**
     * 反应金属
     */
    fyjs(18, "反应金属", "J1AU-9|八|10.82", "J1AU-9|四|10.81", "9CK-KZ|四|10.66", "3T7-M8|七|10.65", "4N-BUI|二|10.43"),
    /**
     * 有毒金属
     */
    ydjs(19, "有毒金属", "J1AU-9|十一|11.26", "XCBK-X|八|9.22", "9CK-KZ|二|8.54", "J1AU-9|三|6.14", "X3-PBC|一|5.12"),
    /**
     * 工业纤维
     */
    gyxw(20, "工业纤维", "J1AU-9|六|13.57", "X3-PBC|十|11.98", "X3-PBC|七|11.67", "5S-KXA|十一|10.75", "GY5-26|六|10.09"),
    /**
     * 超张力塑料
     */
    czlsl(21, "超张力塑料", "9CK-KZ|二|26.5", "N2IS-B|九|24.13", "9CK-KZ|三|22.25", "X3-PBC|二|18.09"),
    /**
     * 聚芳酰胺
     */
    jfxz(22, "聚芳酰胺", "5S-KSA|二|28.55", "J1AU-9|二|27.54", "X3-PBC|三|26.62", "X3-PBC|十一|25.87", "J1AU-9|十|25.33"),
    /**
     * 冷却剂
     */
    lqj(23, "冷却剂", "MZ1E-P|九|27.39", "WUZ-WM|八|26.68", "WUZ-WM|七|25.83", "N2IS-B|七|24.15", "GY5-26|十二|23.23"),
    /**
     * 凝缩液
     */
    nsy(24, "凝缩液", "J1AU-9|七|32.45", "X3-PBC|十|31.28", "5S-KXA|十二|30.62", "5S-KXA|五|27.42", "XCBK-X|六|25.68"),
    /**
     * 建筑模块
     */
    jzmk(25, "建筑模块", "MZ1E-P|六|41.31", "3T7-M8|三|37.5", "WUZ-WM|二|37.27", "5S-KXA|三|37.25", "N2IS-B|六|36.52"),
    /**
     * 纳米体
     */
    nmt(26, "纳米体", "U-TJ7Y|二|12.58", "5S-KXA|八|11.43", "J1AU-9|四|8.63"),
    /**
     * 硅结构铸材
     */
    gjgzc(27, "硅结构铸材", "J1AU-9|十一|22.05", "X3-PBC|十一|17.46", "J1AU-9|三|15.34", "X3-PBC|四|11.65", "X3-PBC|二|10.21"),
    /**
     * 灵巧单元建筑模块
     */
    lqdyjzmk(28, "灵巧单元建筑模块", "J1AU-9|七|33.12", "GY5-26|五|31.62", "N2IS-B|二|27.05", "9CK-KZ|五|25.2", "J1AU-9|二|24.73"),
    /**
     * 重水
     */
    zs(29, "重水", "J1AU-9|十一|446.04", "X3-PBC|九|437.94", "5S-KXA|十二|371.25", "4N-BUI|五|340.75", "N2IS-B|十一|334.75"),
    /**
     * 悬浮等离子
     */
    xfdlz(30, "悬浮等离子", "N2IS-B|九|142.38", "J1AU-9|四|122.47"),
    /**
     * 液化臭氧
     */
    yhcy(31, "液化臭氧", "MZ1E-P|五|59.22", "N2IS-B|三|55.97", "XCBK-X|七|55.20", "5S-KXA|五|54.41", "5S-KXA|十一|46.69"),
    /**
     * 离子溶液
     */
    lzry(32, "离子溶液", "X3-PBC|十一|18", "43B-01|九|15.79", "43B-01|二|15.47", "GY5-26|十一|14.73", "VPLL-N|五|14.31"),
    /**
     * 同位素燃料
     */
    twsrl(33, "同位素燃料", "9CK-KZ|二|5.96", "9CK-KZ|一|5.83", "43B-01|一|5.05", "J1AU-9|五|4.97", "X3-PBC|一|3.58"),
    /**
     * 等离子体团
     */
    dlztt(34, "等离子体团", "43B-01|一|2.42", "5S-KXA|八|2.01", "XCBK-X|一|1.88", "J1AU-9|二|1.76", "X3-PBC|四|1.74");

    @Getter
    private int code;
    @Getter
    private String name;
    @Getter
    private String[] maxPlant;

    PlanetaryMaterialsEnum(int code, String name, String... maxPlant) {
        this.code = code;
        this.name = name;
        this.maxPlant = maxPlant;
    }

    public static PlanetaryMaterialsEnum ofCode(Integer code) {
        return Arrays.stream(PlanetaryMaterialsEnum.values()).filter(x -> Objects.equals(code, x.getCode())).findAny().orElse(null);
    }
}
